Skip to content

ci: fix connected tests - #60

Merged
283375 merged 7 commits into
masterfrom
ci/fix-connected-tests
Aug 29, 2026
Merged

ci: fix connected tests#60
283375 merged 7 commits into
masterfrom
ci/fix-connected-tests

Conversation

@283375

@283375 283375 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes the connectedAndroidTest workflow after the KMP migration (222b0d8). Supersedes and closes #49. Also closes #48.

Background

Since 222b0d8 only :core: tests actually ran on CI (the aggregate task name doesn't match the flavored :app: or the KMP :shared: modules), the artifact was always empty (reports archived from the wrong modules, failures silenced by \|\| true), and API 24 jobs failed frequently on emulator install hangs.

Commits

  • fix connected test report upload losing core module reports — archive :core: reports too, upload with if-no-files-found: error
  • run all module connected tests with explicit task names:app: (unstable flavor), :core:, :shared: device tests now actually run
  • harden connected test script against silent report lossset -euo pipefail, fail loudly when expected report dirs are missing, dedupe task list
  • retry once on emulator environment failures with diagnostics — signature-based retry (adb restart) + per-attempt logs and logcat dump into the artifact

Verification

API 24 and API 36 both fully green; the retry path was naturally exercised (landscape install hang → retry → pass) with diagnostics present in the artifact.

API level / default target intentionally unchanged (minSdk 24, no Google services requirement).

283375 added 2 commits August 29, 2026 20:00
The KMP migration (222b0d8) switched the workflow to
'connectedDebugAndroidTest' and archive only app/shared report dirs.
Since :app: has product flavors and :shared: uses the KMP android
target, that aggregate task only matched :core:, whose reports were
never archived. The artifact directory stayed empty and
upload-artifact silently skipped uploading (default warn).

- Archive :core: reports alongside app/shared ones
- Upload with if-no-files-found: error so an empty archive fails the
  job instead of silently succeeding
'connectedDebugAndroidTest' only matched :core: — :app: has product
flavors and :shared: is a KMP android target, so their device-test
tasks have different names and never ran on CI (#48, #49).

- app: connectedUnstableDebugAndroidTest (unstable flavor only for now;
  tests are identical across flavors, and unstable is the main line)
- core: connectedDebugAndroidTest
- shared: connectedAndroidDeviceTest (no test sources yet, kept so
  future shared device tests run automatically)

Build step assembles the same explicit set before the emulator starts.
283375 added 3 commits August 29, 2026 20:47
- set -euo pipefail so unexpected failures (e.g. adb unavailable) abort
  the script instead of limping on
- archive_reports now verifies every module listed in TEST_TASKS
  produced a non-empty report dir before copying, failing loudly when
  not — previously a missing dir silently produced an empty artifact
  (commit ffa831a)
- deduplicate the gradle task list into TEST_TASKS (portrait/landscape
  previously repeated it and could drift)
- note the API 24 additionalTestOutput warning observed in CI logs
API 24 emulators intermittently hang during streamed APK installs
(ShellCommandUnresponsiveException -> InstallException: Failed to
install-write all apks), randomly hitting whichever module installs
next. Seen across CI runs since June regardless of which module is
affected.

- On failure, check the gradle output against known
  environment-instability signatures; only then restart adb and retry
  the stage once. Real test regressions are never retried.
- Each attempt's gradle log is kept separately, and logcat + adb
  devices state are dumped into the artifact on retry for diagnosis.
"No compose hierarchies found" is the rarer variant of the same
environment stall (activity failed to launch on a device that hung
mid-install), seen in the July 4 CI run.
@283375 283375 changed the title ci: fix connected tests (report upload, task names, API 24 stability) ci: fix connected tests Aug 29, 2026
@283375
283375 force-pushed the ci/fix-connected-tests branch from 5e2500f to eaa8cd3 Compare August 29, 2026 16:45
@283375
283375 marked this pull request as ready for review August 29, 2026 17:55
@283375
283375 merged commit 9285791 into master Aug 29, 2026
5 of 6 checks passed
@283375
283375 deleted the ci/fix-connected-tests branch August 29, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(CI) Connected Android Tests Not Running shared Tests

1 participant